Resolves and initializes the system's default audio output device for DSP processing.
async function resolveDefaultAudioOutputDevice(
init: DspPipelineInitializationState
): Promise<AudioDevice | null>;
The resolveDefaultAudioOutputDevice() function attempts to locate the system's default audio output device and prepare it for DSP processing.
The function:
"default" entry, or the first output device in browsers without one, such as Firefox; see findDefaultAudioDevice())This function is typically called after successful DSP pipeline initialization and serves as the final step before audio playback or processing begins.
The output device of the returned AudioDevice can be switched later with setOutputDevice(), so there is no need to resolve a new device when the user picks another output.
Note: This function is asynchronous and must be called within an asynchronous scope.
init: DspPipelineInitializationState – The DSP pipeline initialization state containing:
workletBlobUrl: Blob URL pointing to the constructed AudioWorklet processorAudioDevice – The resolved and initialized default audio output device.null – Returned if no default audio output device could be found or initialized.WARNING:FLUEXGL-DSP@0001No default audio output device was found.
WarningCodes.NO_DEFAULT_AUDIO_DEVICE_FOUND
This warning is emitted when the system reports no audio output device at all. The function then returns null.
Browser-level exceptions may be thrown if media device enumeration fails or if the AudioWorklet cannot be attached to the resolved device.